# Maintainer: Timo Teras <timo.teras@iki.fi>
pkgname=squark
pkgver=0.6.1
pkgrel=6
pkgdesc="Squid User Authentication and Rating Kit"
url="https://git-old.alpinelinux.org/hosted/squark/"
arch="all"
license="GPL-2.0-only"
depends="haserl"
makedepends="net-snmp-dev cmph-dev lua-dev"
install="$pkgname.post-install"
subpackages="$pkgname-dbg $pkgname-doc"
source="https://dev.alpinelinux.org/archive/squark/squark-$pkgver.tar.xz
	gcc-10.patch
	"
options="!check"

prepare() {
	default_prepare
	sed -i -e 's:-Werror::' Make.rules
	sed -i -e 's:lua5.1:lua:g' src/Makefile
}

build() {
	make FULL_VERSION="$pkgver-r$pkgrel"
}

package() {
	make FULL_VERSION="$pkgver-r$pkgrel" DESTDIR="$pkgdir" install
}

sha512sums="f04b0cf5e300bab43bbc768a30cb8339e8a026d6fc090ccf3c98c0fa932a4cf3ef2ed11e5b5b94a68e1f7577fa3875cd537c6ed535e2af012b6d464b20123f3e  squark-0.6.1.tar.xz
1e9f0996b766c4b9e4eb12ec29c0760ec1f7c963a4150f9e09cf217a51ad19aad6c2889a6ab217ad7cd63f9600ce559269a444f73fec1d400d8a761ea4bc6131  gcc-10.patch"
